home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
qbhelp_2.arc
/
QBHELP.ASC
next >
Wrap
Text File
|
1988-01-16
|
4KB
|
113 lines
' Memory resident QB help program Alt-X activates
' by Kauko J. Laurinolli Dec. 2, 1987 404-981-9550
' Assembly Subroutines : Mach 2 V2.00 and Stay-res Plus from MicroHelp
' Screens generated with: OSG V1.05 from Inventories Unlimited
' Compiled with QB4
' BC qbhelp.asc/o;
' LINK stayqb4+qbhelp+nocom+dispscr2,,nul,qbhelp.lib+mhlib2+bcom40 /E;
defint a-z
call get.monitor (last.monitor) 'get monitor type
scr.buffer$ = space$(16 * 1024 + 50) 'space for screen image
kshift = varptr(scr.buffer$) 'get segment address
call stayres( 3, kscan, kshift, ecode) 'initiate
kscan = 16 * 1024 'screen buffer inside basic
call stayres( 4, kscan, kshift, ecode)
kscan = &h2D: kshift = 8: oper = 0
call MhScr("Programmers Help Loaded, use Alt-X to Activate", 0, csrlin, 1, 15)
HOT.KEY:
call stayres( oper, kscan, kshift, ecode) 'go to sleep
call get.monitor (monitor) 'check monitor type
if last.monitor <> monitor then 'change video mode
call stayres( 2, kscan, kshift, ecode)
last.monitor = monitor
end if
call colr 'show main screen
call ascii1 'show 1st ascii table
curr.key = 1: mss$ = space$(10)
CALL MhScr(" Programmers Help by K. Laurinolli <Esc> <Esc> to Quit PgUp PgDn ", 0, 25, 1, 78)
Old.Scan = 0 'clear old.scan
DO.SCAN:
shft = 0
call MhKclr(&h1600, 0, 1, 1, shift, scan, ascii) 'get curr.key
if (shift and 1) = 1 then shft = shft + 1
if (shift and 2) = 2 then shft = shft + 2
if (shift and 4) = 4 then shft = shft + 4
if (shift and 8) = 8 then shft = shft + 8
for col = 13 to 46 step 11
call mhscr(mss$, 0, 22, col, 51) 'clear fields
call mhscr(mss$, 0, 23, col, 51)
next
call mhscr(chr$(ascii), 0, 22, 17, 63) 'char
call mhscr(str$(ascii), 0, 22, 28, 63) 'ascii
call mhscr(hex$(ascii), 0, 23, 29, 63)
call mhscr(str$(shft), 0, 22, 39, 63) 'shift
call mhscr(hex$(shft), 0, 23, 40, 63)
call mhscr(str$(scan), 0, 22, 49, 63) 'scan
call mhscr(hex$(scan), 0, 23, 50, 63)
REM if scan = 2 then oper = 9: goto HOT.KEY 'leave program, REM this when finished programming
if old.scan = scan and scan = 1 then goto hot.key 'go back to sleep after <Esc><Esc>
if scan = 80 or scan = 81 or scan = 72 or scan = 73 then 'page ascii tables
if scan = 80 or scan = 81 then 'page forward
if Curr.Key < 5 then
Curr.Key = Curr.Key + 1
else
Curr.Key = 1
end if
end if
if scan = 72 or scan = 73 then 'page backward
if Curr.Key > 1 then
Curr.Key = Curr.Key - 1
else
Curr.Key = 5
end if
end if
if curr.key = 1 then call ascii1 'show different ascii tables
if curr.key = 2 then call ascii2
if curr.key = 3 then call ascii3
if curr.key = 4 then call ascii4
if curr.key = 5 then call ascii5
end if
Old.Scan = scan 'set old keyscan
goto do.scan
END
SUB GET.MONITOR(MONITOR) STATIC
call mhdisplay(mode,columns,rows,memory,display.type)
if (display.type and 128)=128 then
monitor = &hB800 '&hB800 for color &hFFFF for no snow-check
else
monitor = &hB000 'mono
end if
call mhvideo(monitor)
if monitor=&hB800 then call mhvideo(&hFFFF) 'turn off snow checking on color monitors
end sub 'get.monitor mono / color